package com.example.framwork.exception;

import com.example.framwork.code.CodeConst;

/**
 * @author Sheeper
 * @date 2018/5/22.
 */
public class ValidateException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private String msg;

    public Object[] getObjects() {
        return objects;
    }

    public void setObjects(Object[] objects) {
        this.objects = objects;
    }

    //多语言参数
    private Object[] objects;
    private int code = CodeConst.PARAM_ERROR;

    public ValidateException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public ValidateException(String msg, Object... objects) {
        super(msg);
        this.msg = msg;
        this.objects = objects;
    }
}
